import request from '../utils/httpRequest';
//获取分类
export const getCategoryList = () => {
  return request.get({
    url: '/app-api/product/category/list',
  });
};

//获取分类对应商品
export const getCategoryGoodsList = (ids) => {
  return request.get({
    url: `/app-api/product/category/list-by-ids?ids=${ids}`,
  });
};

// 获取商户or商品模糊搜索信息
export const getShopInfo = (data) => {
  return request.get({
    url: '/app-api/product/spu/productNameList',
    data,
  });
};

// 获取楼号信息
export const getFloorInfo = (data) => {
  return request.get({
    url: '/app-api/product/shop-info/getBuildingList',
    data,
  });
};

// 获得店铺信息分页
export const getStorePage = (data) => {
  return request.get({
    url: '/app-api/product/shop-info/page',
    data,
  });
};

// 获得商品分类
export const getShopList = (data) => {
  return request.get({
    url: '/app-api/product/category/list',
    data,
  });
};

// 获得当前秒杀活动商品列表
export const getSpecialsPage = (data) => {
  return request.get({
    url: '/app-api/promotion/seckill-activity/list',
    data,
  });
};

// 获得商品 SPU 分页
export const getShopSpuPage = (data) => {
  return request.get({
    url: '/app-api/product/spu/page',
    data,
  });
};
